<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <component-a></component-a>
    <component-b></component-b>
  </div>
  <script src="../vue.js"></script>
  <script>
    var ComponentA = {
      data: function () {
        return {
          name: '斯塔克'
        }
      },
      template: `<div>{{ name }}</div>`
    }

    var ComponentB = {
      data: function () {
        return {
          name: '钢铁侠'
        }
      },
      template: `<div>{{ name }}</div>`
    }
    var vm = new Vue({
      el: '#app',
      data: {},
      components: {
        'component-a': ComponentA,
        'component-b': ComponentB
      }
    })
  </script>
</body>

</html>